import { METHODS } from "http";

//全局变量定义
const common = {
  pageSize: 15
}

const status = {
  NO:0,
  YES: 1,
  OTHER:3,
  NEGATIVE:-1,
  TWO:2
}

/**
* 操作级权限判断
* @param optCode 编码
*/
export function hasOpt(optCode) {
  var optMap = JSON.parse(sessionStorage.getItem('optJsons'));
  if(optMap == null){
    return false;
  }
  if (optMap[optCode]) {
    return true;
  }
  return false;
}

export default {
  common,
  hasOpt,
  status
}
